<cfparam name="FORM.WSID" default="">
<cfparam name="FORM.RD" default="2013-1-1">
<cfparam name="FORM.pID" default="">
<cfparam name="FORM.guID" default="">
<cfparam name="FORM.rem" default="">
<cfparam name="FORM.patt" default="">
<cfparam name="FORM.cat" default="">
<cfparam name="FORM.usID" default="">

<cfif isDefined("url.nsub") or isDefined("url.nlv")>
    <cfquery name="INSERT" datasource="#client.company_dsn#">
        INSERT INTO CINWSHISTORY (WSDOCNUMBER,REFERENCEDATE,PERSONNELIDNO,GUID,REMARKS,PATTERNCODE,
        CATEGORY,USERID,RECDATECREATED,RECCREATEDBY,DATELASTUPDATE,TIMELASTUPDATE,ISLEAVE)	
        VALUES(
        	'#FORM.WSID#',
            #CreateODBCDate(FORM.RD)#,
            '#FORM.pID#',
            '#FORM.guID#',
            '#FORM.rem#',
            '#FORM.patt#',
            '#FORM.cat#',
            '#FORM.usID#',
            #CreateODBCDate(Now())#,
            '#FORM.usID#',
            #CreateODBCDate(Now())#,
            '#TimeFormat(Now(),"hh:mm:ss")#'
            <cfif isDefined("url.nlv")>,'Y'<cfelse>,'N'</cfif>
        )
    </cfquery>
 
</cfif>

